
callback-self:     file format elf64-littleaarch64


Disassembly of section .init:

00000000004003c8 <_init>:
  4003c8:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  4003cc:	910003fd 	mov	x29, sp
  4003d0:	9400002e 	bl	400488 <call_weak_fn>
  4003d4:	a8c17bfd 	ldp	x29, x30, [sp], #16
  4003d8:	d65f03c0 	ret

Disassembly of section .plt:

00000000004003e0 <.plt>:
  4003e0:	a9bf7bf0 	stp	x16, x30, [sp, #-16]!
  4003e4:	90000090 	adrp	x16, 410000 <__FRAME_END__+0xf8e4>
  4003e8:	f947fe11 	ldr	x17, [x16, #4088]
  4003ec:	913fe210 	add	x16, x16, #0xff8
  4003f0:	d61f0220 	br	x17
  4003f4:	d503201f 	nop
  4003f8:	d503201f 	nop
  4003fc:	d503201f 	nop

0000000000400400 <__libc_start_main@plt>:
  400400:	b0000090 	adrp	x16, 411000 <__libc_start_main@GLIBC_2.17>
  400404:	f9400211 	ldr	x17, [x16]
  400408:	91000210 	add	x16, x16, #0x0
  40040c:	d61f0220 	br	x17

0000000000400410 <__gmon_start__@plt>:
  400410:	b0000090 	adrp	x16, 411000 <__libc_start_main@GLIBC_2.17>
  400414:	f9400611 	ldr	x17, [x16, #8]
  400418:	91002210 	add	x16, x16, #0x8
  40041c:	d61f0220 	br	x17

0000000000400420 <abort@plt>:
  400420:	b0000090 	adrp	x16, 411000 <__libc_start_main@GLIBC_2.17>
  400424:	f9400a11 	ldr	x17, [x16, #16]
  400428:	91004210 	add	x16, x16, #0x10
  40042c:	d61f0220 	br	x17

0000000000400430 <printf@plt>:
  400430:	b0000090 	adrp	x16, 411000 <__libc_start_main@GLIBC_2.17>
  400434:	f9400e11 	ldr	x17, [x16, #24]
  400438:	91006210 	add	x16, x16, #0x18
  40043c:	d61f0220 	br	x17

Disassembly of section .text:

0000000000400440 <_start>:
  400440:	d280001d 	mov	x29, #0x0                   	// #0
  400444:	d280001e 	mov	x30, #0x0                   	// #0
  400448:	aa0003e5 	mov	x5, x0
  40044c:	f94003e1 	ldr	x1, [sp]
  400450:	910023e2 	add	x2, sp, #0x8
  400454:	910003e6 	mov	x6, sp
  400458:	580000c0 	ldr	x0, 400470 <_start+0x30>
  40045c:	580000e3 	ldr	x3, 400478 <_start+0x38>
  400460:	58000104 	ldr	x4, 400480 <_start+0x40>
  400464:	97ffffe7 	bl	400400 <__libc_start_main@plt>
  400468:	97ffffee 	bl	400420 <abort@plt>
  40046c:	00000000 	.inst	0x00000000 ; undefined
  400470:	004005fc 	.word	0x004005fc
  400474:	00000000 	.word	0x00000000
  400478:	00400668 	.word	0x00400668
  40047c:	00000000 	.word	0x00000000
  400480:	004006e0 	.word	0x004006e0
  400484:	00000000 	.word	0x00000000

0000000000400488 <call_weak_fn>:
  400488:	90000080 	adrp	x0, 410000 <__FRAME_END__+0xf8e4>
  40048c:	f947f000 	ldr	x0, [x0, #4064]
  400490:	b4000040 	cbz	x0, 400498 <call_weak_fn+0x10>
  400494:	17ffffdf 	b	400410 <__gmon_start__@plt>
  400498:	d65f03c0 	ret
  40049c:	00000000 	.inst	0x00000000 ; undefined

00000000004004a0 <deregister_tm_clones>:
  4004a0:	b0000081 	adrp	x1, 411000 <__libc_start_main@GLIBC_2.17>
  4004a4:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  4004a8:	9100c021 	add	x1, x1, #0x30
  4004ac:	9100c000 	add	x0, x0, #0x30
  4004b0:	91001c21 	add	x1, x1, #0x7
  4004b4:	cb000021 	sub	x1, x1, x0
  4004b8:	f100383f 	cmp	x1, #0xe
  4004bc:	540000a9 	b.ls	4004d0 <deregister_tm_clones+0x30>  // b.plast
  4004c0:	580000c1 	ldr	x1, 4004d8 <deregister_tm_clones+0x38>
  4004c4:	b4000061 	cbz	x1, 4004d0 <deregister_tm_clones+0x30>
  4004c8:	d61f0020 	br	x1
  4004cc:	d503201f 	nop
  4004d0:	d65f03c0 	ret
  4004d4:	d503201f 	nop
	...

00000000004004e0 <register_tm_clones>:
  4004e0:	b0000081 	adrp	x1, 411000 <__libc_start_main@GLIBC_2.17>
  4004e4:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  4004e8:	9100c021 	add	x1, x1, #0x30
  4004ec:	9100c000 	add	x0, x0, #0x30
  4004f0:	cb000021 	sub	x1, x1, x0
  4004f4:	9343fc21 	asr	x1, x1, #3
  4004f8:	8b41fc21 	add	x1, x1, x1, lsr #63
  4004fc:	9341fc21 	asr	x1, x1, #1
  400500:	b4000081 	cbz	x1, 400510 <register_tm_clones+0x30>
  400504:	580000a2 	ldr	x2, 400518 <register_tm_clones+0x38>
  400508:	b4000042 	cbz	x2, 400510 <register_tm_clones+0x30>
  40050c:	d61f0040 	br	x2
  400510:	d65f03c0 	ret
  400514:	d503201f 	nop
	...

0000000000400520 <__do_global_dtors_aux>:
  400520:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400524:	910003fd 	mov	x29, sp
  400528:	f9000bf3 	str	x19, [sp, #16]
  40052c:	b0000093 	adrp	x19, 411000 <__libc_start_main@GLIBC_2.17>
  400530:	3940c260 	ldrb	w0, [x19, #48]
  400534:	35000080 	cbnz	w0, 400544 <__do_global_dtors_aux+0x24>
  400538:	97ffffda 	bl	4004a0 <deregister_tm_clones>
  40053c:	52800020 	mov	w0, #0x1                   	// #1
  400540:	3900c260 	strb	w0, [x19, #48]
  400544:	f9400bf3 	ldr	x19, [sp, #16]
  400548:	a8c27bfd 	ldp	x29, x30, [sp], #32
  40054c:	d65f03c0 	ret

0000000000400550 <frame_dummy>:
  400550:	90000080 	adrp	x0, 410000 <__FRAME_END__+0xf8e4>
  400554:	91380000 	add	x0, x0, #0xe00
  400558:	f9400001 	ldr	x1, [x0]
  40055c:	b5000061 	cbnz	x1, 400568 <frame_dummy+0x18>
  400560:	17ffffe0 	b	4004e0 <register_tm_clones>
  400564:	d503201f 	nop
  400568:	58000101 	ldr	x1, 400588 <frame_dummy+0x38>
  40056c:	b4ffffa1 	cbz	x1, 400560 <frame_dummy+0x10>
  400570:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  400574:	910003fd 	mov	x29, sp
  400578:	d63f0020 	blr	x1
  40057c:	a8c17bfd 	ldp	x29, x30, [sp], #16
  400580:	17ffffd8 	b	4004e0 <register_tm_clones>
  400584:	d503201f 	nop
	...

0000000000400590 <add>:
#include <stdio.h>

int add(int a, int b)
{
  400590:	d10043ff 	sub	sp, sp, #0x10
  400594:	b9000fe0 	str	w0, [sp, #12]
  400598:	b9000be1 	str	w1, [sp, #8]
	return a + b;
  40059c:	b9400fe1 	ldr	w1, [sp, #12]
  4005a0:	b9400be0 	ldr	w0, [sp, #8]
  4005a4:	0b000020 	add	w0, w1, w0
}
  4005a8:	910043ff 	add	sp, sp, #0x10
  4005ac:	d65f03c0 	ret

00000000004005b0 <mul>:

int mul(int a, int b)
{
  4005b0:	d10043ff 	sub	sp, sp, #0x10
  4005b4:	b9000fe0 	str	w0, [sp, #12]
  4005b8:	b9000be1 	str	w1, [sp, #8]
	return a * b;
  4005bc:	b9400fe1 	ldr	w1, [sp, #12]
  4005c0:	b9400be0 	ldr	w0, [sp, #8]
  4005c4:	1b007c20 	mul	w0, w1, w0
}
  4005c8:	910043ff 	add	sp, sp, #0x10
  4005cc:	d65f03c0 	ret

00000000004005d0 <callback_self>:

int callback_self(int a, int b, int (*rec)(int c, int d))
{
  4005d0:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  4005d4:	910003fd 	mov	x29, sp
  4005d8:	b9001fa0 	str	w0, [x29, #28]
  4005dc:	b9001ba1 	str	w1, [x29, #24]
  4005e0:	f9000ba2 	str	x2, [x29, #16]
	return rec(a, b);
  4005e4:	f9400ba2 	ldr	x2, [x29, #16]
  4005e8:	b9401ba1 	ldr	w1, [x29, #24]
  4005ec:	b9401fa0 	ldr	w0, [x29, #28]
  4005f0:	d63f0040 	blr	x2
}
  4005f4:	a8c27bfd 	ldp	x29, x30, [sp], #32
  4005f8:	d65f03c0 	ret

00000000004005fc <main>:


int main(int argc, char *argv[])
{
  4005fc:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400600:	910003fd 	mov	x29, sp
  400604:	b9001fa0 	str	w0, [x29, #28]
  400608:	f9000ba1 	str	x1, [x29, #16]
	printf("[add = %d]\n",callback_self(3,3,add));
  40060c:	90000000 	adrp	x0, 400000 <_init-0x3c8>
  400610:	91164000 	add	x0, x0, #0x590
  400614:	aa0003e2 	mov	x2, x0
  400618:	52800061 	mov	w1, #0x3                   	// #3
  40061c:	52800060 	mov	w0, #0x3                   	// #3
  400620:	97ffffec 	bl	4005d0 <callback_self>
  400624:	2a0003e1 	mov	w1, w0
  400628:	90000000 	adrp	x0, 400000 <_init-0x3c8>
  40062c:	911c0000 	add	x0, x0, #0x700
  400630:	97ffff80 	bl	400430 <printf@plt>
	printf("[mul = %d]\n",callback_self(3,3,mul));
  400634:	90000000 	adrp	x0, 400000 <_init-0x3c8>
  400638:	9116c000 	add	x0, x0, #0x5b0
  40063c:	aa0003e2 	mov	x2, x0
  400640:	52800061 	mov	w1, #0x3                   	// #3
  400644:	52800060 	mov	w0, #0x3                   	// #3
  400648:	97ffffe2 	bl	4005d0 <callback_self>
  40064c:	2a0003e1 	mov	w1, w0
  400650:	90000000 	adrp	x0, 400000 <_init-0x3c8>
  400654:	911c4000 	add	x0, x0, #0x710
  400658:	97ffff76 	bl	400430 <printf@plt>
	
	return 0;
  40065c:	52800000 	mov	w0, #0x0                   	// #0
}
  400660:	a8c27bfd 	ldp	x29, x30, [sp], #32
  400664:	d65f03c0 	ret

0000000000400668 <__libc_csu_init>:
  400668:	a9bc7bfd 	stp	x29, x30, [sp, #-64]!
  40066c:	910003fd 	mov	x29, sp
  400670:	a9025bf5 	stp	x21, x22, [sp, #32]
  400674:	90000095 	adrp	x21, 410000 <__FRAME_END__+0xf8e4>
  400678:	a90153f3 	stp	x19, x20, [sp, #16]
  40067c:	90000094 	adrp	x20, 410000 <__FRAME_END__+0xf8e4>
  400680:	9137c2b5 	add	x21, x21, #0xdf0
  400684:	9137e294 	add	x20, x20, #0xdf8
  400688:	cb150294 	sub	x20, x20, x21
  40068c:	a90363f7 	stp	x23, x24, [sp, #48]
  400690:	aa0203f6 	mov	x22, x2
  400694:	2a0003f8 	mov	w24, w0
  400698:	aa0103f7 	mov	x23, x1
  40069c:	97ffff4b 	bl	4003c8 <_init>
  4006a0:	9343fe94 	asr	x20, x20, #3
  4006a4:	b4000154 	cbz	x20, 4006cc <__libc_csu_init+0x64>
  4006a8:	d2800013 	mov	x19, #0x0                   	// #0
  4006ac:	f8737aa3 	ldr	x3, [x21, x19, lsl #3]
  4006b0:	aa1603e2 	mov	x2, x22
  4006b4:	aa1703e1 	mov	x1, x23
  4006b8:	2a1803e0 	mov	w0, w24
  4006bc:	91000673 	add	x19, x19, #0x1
  4006c0:	d63f0060 	blr	x3
  4006c4:	eb13029f 	cmp	x20, x19
  4006c8:	54ffff21 	b.ne	4006ac <__libc_csu_init+0x44>  // b.any
  4006cc:	a94153f3 	ldp	x19, x20, [sp, #16]
  4006d0:	a9425bf5 	ldp	x21, x22, [sp, #32]
  4006d4:	a94363f7 	ldp	x23, x24, [sp, #48]
  4006d8:	a8c47bfd 	ldp	x29, x30, [sp], #64
  4006dc:	d65f03c0 	ret

00000000004006e0 <__libc_csu_fini>:
  4006e0:	d65f03c0 	ret

Disassembly of section .fini:

00000000004006e4 <_fini>:
  4006e4:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  4006e8:	910003fd 	mov	x29, sp
  4006ec:	a8c17bfd 	ldp	x29, x30, [sp], #16
  4006f0:	d65f03c0 	ret
